package com.sq.partner.manager.dao;

import java.sql.SQLException;

import com.sq.partner.manager.mybatis.model.FacadeTempPolicy;

/**
 * 暂存单Dao
 * 
 * @author zhouxiuxiu
 *
 */
public interface FacadeTempPolicyDao extends BaseDao {
    
    /**
     * 生成一个新的暂存单号
     * 
     * @return
     * @throws SQLException
     */
    public String queryNewStagNo() throws SQLException;
    
    /**
     * 增加暂存单信息
     * @param facadeTempPolicy
     * @throws Exception
     */
    public void insertFacadeTempPolicy(FacadeTempPolicy facadeTempPolicy)
            throws Exception;

    /**
     * 修改暂存单信息
     * @param facadeTempPolicy
     * @throws Exception
     */
    public void updateTempPolicyNotNull(FacadeTempPolicy facadeTempPolicy)
            throws Exception;

    /**
     * 查找暂存单信息
     * @param facadeTempPolicy
     * @throws Exception
     */
    public FacadeTempPolicy selectFacadeTempPolicy(
            FacadeTempPolicy facadeTempPolicy) throws Exception;

    /**
     * 根据ID查询暂存单
     * 
     * @param stageNo
     * @return
     * @throws Exception
     */
    public FacadeTempPolicy queryFacadeTempPolicyById(String stageNo)
            throws Exception;
    
    /**
     * 根据投保单号查询暂存单信息（新意健险）
     * 
     * @param appNo
     *            投保单号
     **/
    public FacadeTempPolicy getTempPolicyByAppNo(String appNo) throws Exception;
    
    /**
	 * 支付完成更新暂存单表状态为12 支付完成 20190425 helina
	 * @param facadeTempPolicy
	 * @return
	 * @throws Exception 
	 */
	public boolean updateFacadeTempPolicyStatus12(FacadeTempPolicy facadeTempPolicy) throws Exception;
}
